//package com.ruoyi.personnel.management.position.controller;
//
//import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
//import com.ruoyi.common.core.controller.BaseController;
//import com.ruoyi.common.core.domain.AjaxResult;
//import com.ruoyi.common.core.page.TableDataInfo;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.personnel.management.position.domain.PositionInfo;
//import com.ruoyi.personnel.management.position.service.IPositionInfoService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
///**
// * 职位
// * @author Drj 2021/6/28
// */
//@RestController
//@RequestMapping("/personnel/position")
//@Api(value = "职位模块", tags = "职位接口")
//public class PositionInfoController extends BaseController {
//    @Autowired
//    private IPositionInfoService positionInfoService;
//
//
//    /**
//     * 获取职位列表
//     * 需前端处理形成树形结构
//     * @param positionInfo
//     * @return
//     */
//    @ApiOperationSupport(includeParameters = {"PositionInfo.positionInfoName", "PositionInfo.positionInfoId"})
//    @ApiOperation(value = "获取职位列表",notes = "查询所有职位记录信息")
//    @PostMapping("/list")
//    public TableDataInfo list(@Validated @RequestBody PositionInfo positionInfo) {
//        startPage();
//        List<PositionInfo> baseUnitList = positionInfoService.selectPositionInfoList(positionInfo);
//        return getDataTable(baseUnitList);
//    }
//
//    /**
//     * 导出职位
//     *
//     * @param positionInfo
//     * @return
//     */
//    @PostMapping("/export")
//    public AjaxResult export(@RequestBody PositionInfo positionInfo) {
//        List<PositionInfo> list = positionInfoService.selectPositionInfoList(positionInfo);
//        ExcelUtil<PositionInfo> util = new ExcelUtil<PositionInfo>(PositionInfo.class);
//        return util.exportExcel(list, "职位数据");
//    }
//
//    /**
//     * 新增职位
//     *
//     * @param positionInfo
//     * @return
//     */
//    @ApiOperation(value = "新增职位", notes = "新增职位")
//    @ApiImplicitParam(name = "positionInfo", value = "新增职位", dataType = "PositionInfo")
//    @PostMapping("/add")
//    public AjaxResult add(@Validated @RequestBody PositionInfo positionInfo) {
//
//        return toAjax(positionInfoService.insertPositionInfo(positionInfo));
//    }
//
//    /**
//     * 修改职位
//     *
//     * @param positionInfo
//     * @return
//     */
//    @ApiOperation(value = "新增职位", notes = "新增职位")
//    @ApiImplicitParam(name = "positionInfo", value = "新增职位", dataType = "PositionInfo")
//    @PostMapping("/edit")
//    public AjaxResult edit(@Validated @RequestBody PositionInfo positionInfo) {
//        return toAjax(positionInfoService.updatePositionInfo(positionInfo));
//    }
//
//    /**
//     * 删除职位
//     * 仅修改删除标志位
//     *
//     * @param positionInfo
//     * @return
//     */
//    @PostMapping("/delete")
//    public AjaxResult delete(@RequestBody PositionInfo positionInfo) {
//        return toAjax(positionInfoService.updatePositionInfoDeleteFlag(positionInfo));
//    }
//
//}
